<?php
	//start the session
	session_start();
	
	//checks if user has logged in and if not displays an error message
	if(!isset($_SESSION['username']))
	{
		$_SESSION['message'] = "<span style='color: red; font-weight: bold;'>You are not logged in to view this page.</span>";
		header('Location: Login.php');
	}
?>

<!-- user_home.php view-->

<html>
	<head>
		<title>User Home</title>
		<link rel="stylesheet" type="text/css" href="css/style.css" />
	</head>
	
	<body>
		<div id="wrapper">
			<div id="banner"><img src="images/bannerv0.jpg" alt="header graphic"></div>
			<div id="wrapper_links"><?php include("menu/menu.php");?></div>
			<div id="wrapper_body">
					
				<p align="left">User: <?php echo $_SESSION['username'];?></p>
					
				<h3>Welcome to the Sonic Corps Favourites Page</h3>
			
				<p>The purpose of this site is for the Sonic Corps group to be able to favourite website pages for later use, view favourites in
					a range of sorted formats, delete favourites, see how many times a particular site has been visited by the group. The group 
					also has to login to get to any of these pages other pages, and they can register new users if required from the login page.
				</p>	
			</div>
		</div>
	</body>
</html>